Optimal. Leaf size=117 \[ -\frac {2 \sqrt {2} a^3 \tanh ^{-1}\left (\frac {\sqrt {d}+\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {d} f}+\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}+\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+a^3 \tan (e+f x)\right )}{3 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3647, 3711,
3613, 214} \begin {gather*} \frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) \sqrt {d \tan (e+f x)}}{3 d f}-\frac {2 \sqrt {2} a^3 \tanh ^{-1}\left (\frac {\sqrt {d} \tan (e+f x)+\sqrt {d}}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {d} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 3613
Rule 3647
Rule 3711
Rubi steps
\begin {align*} \int \frac {(a+a \tan (e+f x))^3}{\sqrt {d \tan (e+f x)}} \, dx &=\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+a^3 \tan (e+f x)\right )}{3 d f}+\frac {2 \int \frac {a^3 d+3 a^3 d \tan (e+f x)+4 a^3 d \tan ^2(e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{3 d}\\ &=\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}+\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+a^3 \tan (e+f x)\right )}{3 d f}+\frac {2 \int \frac {-3 a^3 d+3 a^3 d \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{3 d}\\ &=\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}+\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+a^3 \tan (e+f x)\right )}{3 d f}-\frac {\left (12 a^6 d\right ) \text {Subst}\left (\int \frac {1}{-18 a^6 d^2+d x^2} \, dx,x,\frac {-3 a^3 d-3 a^3 d \tan (e+f x)}{\sqrt {d \tan (e+f x)}}\right )}{f}\\ &=-\frac {2 \sqrt {2} a^3 \tanh ^{-1}\left (\frac {\sqrt {d}+\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {d} f}+\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}+\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+a^3 \tan (e+f x)\right )}{3 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 6.09, size = 553, normalized size = 4.73 \begin {gather*} \frac {6 \cos ^2(e+f x) \sin (e+f x) (a+a \tan (e+f x))^3}{f (\cos (e+f x)+\sin (e+f x))^3 \sqrt {d \tan (e+f x)}}+\frac {2 \cos (e+f x) \sin ^2(e+f x) (a+a \tan (e+f x))^3}{3 f (\cos (e+f x)+\sin (e+f x))^3 \sqrt {d \tan (e+f x)}}+\frac {4 \cos (e+f x) \, _2F_1\left (\frac {3}{4},1;\frac {7}{4};-\tan ^2(e+f x)\right ) \sin ^2(e+f x) (a+a \tan (e+f x))^3}{3 f (\cos (e+f x)+\sin (e+f x))^3 \sqrt {d \tan (e+f x)}}+\frac {\sqrt {2} \text {ArcTan}\left (1-\sqrt {2} \sqrt {\tan (e+f x)}\right ) \cos ^3(e+f x) \sqrt {\tan (e+f x)} (a+a \tan (e+f x))^3}{f (\cos (e+f x)+\sin (e+f x))^3 \sqrt {d \tan (e+f x)}}-\frac {\sqrt {2} \text {ArcTan}\left (1+\sqrt {2} \sqrt {\tan (e+f x)}\right ) \cos ^3(e+f x) \sqrt {\tan (e+f x)} (a+a \tan (e+f x))^3}{f (\cos (e+f x)+\sin (e+f x))^3 \sqrt {d \tan (e+f x)}}+\frac {\cos ^3(e+f x) \log \left (1-\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right ) \sqrt {\tan (e+f x)} (a+a \tan (e+f x))^3}{\sqrt {2} f (\cos (e+f x)+\sin (e+f x))^3 \sqrt {d \tan (e+f x)}}-\frac {\cos ^3(e+f x) \log \left (1+\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right ) \sqrt {\tan (e+f x)} (a+a \tan (e+f x))^3}{\sqrt {2} f (\cos (e+f x)+\sin (e+f x))^3 \sqrt {d \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(308\) vs.
\(2(98)=196\).
time = 0.27, size = 309, normalized size = 2.64
method | result | size |
derivativedivides | \(\frac {2 a^{3} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+3 d \sqrt {d \tan \left (f x +e \right )}-2 d^{2} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) | \(309\) |
default | \(\frac {2 a^{3} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+3 d \sqrt {d \tan \left (f x +e \right )}-2 d^{2} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) | \(309\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 130, normalized size = 1.11 \begin {gather*} -\frac {3 \, a^{3} d {\left (\frac {\sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} - \frac {\sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} - \frac {2 \, {\left (\left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a^{3} + 9 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d\right )}}{d}}{3 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.87, size = 210, normalized size = 1.79 \begin {gather*} \left [\frac {3 \, \sqrt {2} a^{3} \sqrt {d} \log \left (\frac {\tan \left (f x + e\right )^{2} - \frac {2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} {\left (\tan \left (f x + e\right ) + 1\right )}}{\sqrt {d}} + 4 \, \tan \left (f x + e\right ) + 1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left (a^{3} \tan \left (f x + e\right ) + 9 \, a^{3}\right )} \sqrt {d \tan \left (f x + e\right )}}{3 \, d f}, \frac {2 \, {\left (3 \, \sqrt {2} a^{3} d \sqrt {-\frac {1}{d}} \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-\frac {1}{d}} {\left (\tan \left (f x + e\right ) + 1\right )}}{2 \, \tan \left (f x + e\right )}\right ) + {\left (a^{3} \tan \left (f x + e\right ) + 9 \, a^{3}\right )} \sqrt {d \tan \left (f x + e\right )}\right )}}{3 \, d f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{3} \left (\int \frac {1}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx + \int \frac {3 \tan {\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx + \int \frac {3 \tan ^{2}{\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx + \int \frac {\tan ^{3}{\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 313 vs.
\(2 (103) = 206\).
time = 0.71, size = 313, normalized size = 2.68 \begin {gather*} -\frac {\sqrt {2} {\left (a^{3} d \sqrt {{\left | d \right |}} + a^{3} {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{2 \, d^{2} f} + \frac {\sqrt {2} {\left (a^{3} d \sqrt {{\left | d \right |}} + a^{3} {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{2 \, d^{2} f} - \frac {{\left (\sqrt {2} a^{3} d \sqrt {{\left | d \right |}} - \sqrt {2} a^{3} {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{d^{2} f} - \frac {{\left (\sqrt {2} a^{3} d \sqrt {{\left | d \right |}} - \sqrt {2} a^{3} {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{d^{2} f} + \frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right )} a^{3} d^{5} f^{2} \tan \left (f x + e\right ) + 9 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{5} f^{2}\right )}}{3 \, d^{6} f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.26, size = 100, normalized size = 0.85 \begin {gather*} \frac {6\,a^3\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{d\,f}+\frac {2\,a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{3\,d^2\,f}-\frac {2\,\sqrt {2}\,a^3\,\mathrm {atanh}\left (\frac {32\,\sqrt {2}\,a^6\,\sqrt {d}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{32\,a^6\,d+32\,a^6\,d\,\mathrm {tan}\left (e+f\,x\right )}\right )}{\sqrt {d}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________